/*
 * Copyright (C) 2019-2020 Alibaba Group Holding Limited
 */
#ifndef _APP_MAIN_H_
#define _APP_MAIN_H_

#include <uservice/uservice.h>
#include <yoc/netmgr_service.h>

#define STD_OFF                     (0U)
#define STD_ON                      (1U)

#define ERR_OK                      (0U)
#define ERR_NOT_OK                  (1U)

void board_cli_init();

#include <stdint.h>
extern netmgr_hdl_t app_netmgr_hdl;

extern void network_init(void);
netmgr_hdl_t Net_GetnetMgrHdl(void);
void app_exception_event(uint32_t event_id);
void board_yoc_init(void);
void app_fota_init(void);
void app_fota_start(void);
extern void Wifi_SaveData2Kv(char *ssid, uint8_t ssid_l, char *pwd, uint8_t pwd_l);
extern uint8_t Wifi_SetConfigInfo(char *ssid, uint8_t *ssid_l, char *pwd, uint8_t *pwd_l);

/* user define event */
#define EVENT_DATA_REPORT  (EVENT_USER + 1)
#define EVENT_CHANNEL_CHECK (EVENT_USER + 2)
#define EVENT_CHANNEL_CLOSE (EVENT_USER + 3)

#endif